<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mesog/statistics/Ogstatistics.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mesog/statistics/Ogstatistics.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Tsid',
                footer: "Foots",
                cnName: 'Ogstatistics',
                name: 'statistics/Ogstatistics',
                url: "/Ogstatistics/",
                sortName: "Tsid"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"outsourcing_number":"","production_plan":"","outsourcing_unit_name":"","receipt_status":"","settlement_status":"","creation_time":[null,null],"remarks":""});
            const searchFormOptions = ref([[{"title":"外协编号","field":"outsourcing_number"},{"title":"生产计划","field":"production_plan"},{"title":"外协单位名称","field":"outsourcing_unit_name","type":"like"},{"title":"收货状态","field":"receipt_status"},{"title":"结算状态","field":"settlement_status"},{"title":"创建时间","field":"creation_time","type":"range"},{"title":"备注","field":"remarks"}]]);
            const columns = ref([{field:'outsourcing_number',title:'外协编号',type:'string',width:220,align:'left',sort:true},
                       {field:'production_plan',title:'生产计划',type:'string',width:220,align:'left'},
                       {field:'outsourcing_unit_name',title:'外协单位名称',type:'string',width:220,align:'left'},
                       {field:'rmb_total_amount',title:'人民币总金额',type:'decimal',width:110,align:'left'},
                       {field:'currency_type',title:'币别',type:'string',width:220,align:'left'},
                       {field:'original_currency_total_amount',title:'原币总金额',type:'decimal',width:110,align:'left'},
                       {field:'expected_delivery_date',title:'预计交期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'remaining_days',title:'剩余天数',type:'int',width:110,align:'left'},
                       {field:'overdue_days',title:'逾期天数',type:'int',width:110,align:'left'},
                       {field:'receipt_status',title:'收货状态',type:'string',width:220,align:'left'},
                       {field:'receiver',title:'收货人',type:'string',width:220,align:'left'},
                       {field:'receipt_time',title:'收货时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'settlement_status',title:'结算状态',type:'string',width:220,align:'left'},
                       {field:'creation_time',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'remarks',title:'备注',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
